import { View, Text } from '@tarojs/components'
import { Space, SpinLoading } from 'antd-mobile'
import { LoadProps } from './type'
import './index.scss'

function App(props:LoadProps) {

    const {
        text = '加载中...',
        size = '32px',
        color = 'primary'
    } = props

    return (
        <View className='loadind_container'>
            <Space className='load_block' direction='vertical' justify='center' align='center'  wrap block style={{ '--gap': '16px' }}>
                <SpinLoading color={color} style={{ '--size': size }} />
                <View className='load_text'>{text}</View>
            </Space>
        </View>
    )
}
export default App


